﻿<Window x:Class="AWLoadTester.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="AW Load Tester Main Window" Height="550" Width="625" Name="LoadTesterWindow" Loaded="LoadTesterWindow_Loaded">
    <Grid>
        <TabControl Name="MainTabControl">
            <TabItem Name="GeneralTabItem" Header="General">
                <Grid Name="MainGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" MinWidth="100"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="Auto"></ColumnDefinition>
                        <ColumnDefinition Width="316"></ColumnDefinition>
                        <ColumnDefinition Width="64" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="25"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                    </Grid.RowDefinitions>
                    
                    <Label Content="Location" Grid.Row="0" Grid.Column="0"></Label>
                    <TextBox Name="LocationTextbox" Grid.Row="0" Grid.Column="3" Height="22" Text="{Binding Path=URL}" ></TextBox>

                    <Label Content="Users per Minute" Grid.Row="1" Grid.Column="0"></Label>
                    <TextBox Name="UsersTextbox" Grid.Row="1" Grid.Column="3" Height="22"  Text="{Binding Path=UsersMin}" ></TextBox>

                    <Label Content="Concurrent Connection" Grid.Row="2" Grid.Column="0"></Label>
                    <TextBox Name="ConConnTextbox" Grid.Row="2" Grid.Column="3" Text="{Binding Path=ConConnections}" ></TextBox>

                    <Label Content="Browse Time ( Seconds )" Grid.Row="3" Grid.Column="0"></Label>
                    <TextBox Name="BrowseTimeTextbox" Grid.Row="3" Grid.Column="3" Height="22"  Text="{Binding Path=BrowseTime}" ></TextBox>

                    <Label Content="Test Time ( Minutes )" Grid.Row="4" Grid.Column="0"></Label>
                    <TextBox Name="TestTimeTextbox" Grid.Row="4" Text="{Binding Path=TestTime}" Grid.Column="3" Height="22" ></TextBox>

                    <Label Content="Elapsed Seconds" Grid.Row="5" Grid.Column="0"></Label>
                    <Label Name="ElapsedTimeLabel" Grid.Row="5" Content="{Binding Path=CurrentTime}" Grid.Column="3" Height="22" ></Label>


                    <Label Content="Show Browser" Grid.Row="6" Grid.Column="0"></Label>
                    <CheckBox Name="ShowBrowserCheckBox" Grid.Row="6" IsChecked="{Binding Path=ShowBrowser}" Grid.Column="3" Height="22" ></CheckBox>

                    <Label Content="Output File" Grid.Row="7" Grid.Column="0"></Label>
                    <TextBox Name="OutputFileTextBox" Grid.Row="7" Text="{Binding Path=OutputFile}" Grid.Column="3" 
                                    Width="250" Height="22" HorizontalAlignment="Left" VerticalAlignment="Center"></TextBox>
                    <Button Name="outputFileBrowseButton" Content="Browse..." Grid.Row="7" Grid.Column="3" 
                                    Width="50" Height="22" HorizontalAlignment="Right" VerticalAlignment="Center" Click="outputFileBrowseButton_Click"></Button>
                    
                    <Label Content="Start" Grid.Row="8" Grid.Column="0"></Label>
                    <Button Name="StartButton" Grid.Row="8" Grid.Column="3" Content="Start Test" Margin="4" Width="150" Click="StartButton_Click" HorizontalAlignment="Left"></Button>
                    <Button Name="CancelButton" Grid.Row="8" Grid.Column="3" Content="Cancel Test" Margin="4" Width="150" Click="CancelButton_Click" HorizontalAlignment="Right"></Button>
                    
                </Grid>
            </TabItem>
            <TabItem Name="StatsTab" Header="Statistics">
                <Grid Name="StatsMainGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition Height="30"></RowDefinition>
                    </Grid.RowDefinitions>
                    
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    
                    <Label Content="Threads" Grid.Row="0" Grid.Column="0" Margin="3"></Label>
                    <Label Name="ThreadCountTextBox" Grid.Column="1" Grid.Row="0" Margin="3" Content="{Binding Path=ThreadCount}" ></Label>
                </Grid>
            </TabItem>
            <TabItem Name="LogTab" Header="Log">
                <Grid Name="LogMainGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    
                    <Label Content="Logs" Grid.Row="0" Grid.Column="0"></Label>
                    <ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
                        <DockPanel LastChildFill="True">
                            <TextBlock Name="LogTextBlock" MinHeight="400" MinWidth="500" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" 
                                                            Text="{Binding Path=LogText}" Background="WhiteSmoke" ></TextBlock>
                        </DockPanel>
                    </ScrollViewer>
                </Grid>
            </TabItem>
            <TabItem Name="BrowserTab" Header="Browser">
                <Grid Name="BrowserMainGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>

                    <Button Name="LoadButton" Content="Load" Grid.Row="0" Grid.Column="0" Margin="3" Click="LoadButton_Click"></Button>
                    <Label Name="LocationLabel" Grid.Row="0" Grid.Column="1" Margin="3"></Label>
     
                    <DockPanel LastChildFill="True" Grid.Row="1" Grid.ColumnSpan="2" >
                        <WebBrowser Name="MainWebBrowser" MinWidth="600" MinHeight="600" />
                    </DockPanel>
                </Grid>
            </TabItem>
        </TabControl>

    </Grid>
</Window>
